package com.wing.sell.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.sell.model.entity.OrderOffer;
import com.wing.sell.model.request.OrderOfferForm;
import com.wing.sell.model.response.OrderOfferVO;
import com.wing.sell.model.response.OrderProExcelDetailVo;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 销售订单产品报价记录表-Service
 *
 * @author
 */
public interface OrderOfferService extends IService<OrderOffer> {

    /**
     * 添加
     *
     * @param orderOfferForm
     * @return
     */
    void add(OrderOfferForm orderOfferForm);

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<OrderOfferVO> list4app(Map<String, Object> params);

    /**
     * 分页list-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<OrderOfferVO> pageList4app(Page page, Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    OrderOfferVO get4appById(Long id);

    /**
     * 获取产品的最终价格
     * @param orderId
     * @param id
     * @return
     */
    BigDecimal getOffMoneyBy(Long orderId, Long id);

    //getOffMoneyByProductDetailId
    BigDecimal getOffMoneyByProductDetailId(Long orderId, Long id);


    /**
     * 导出excel
     * @param params
     * @return
     */
    List<OrderProExcelDetailVo> exportInProductInfoDetail(Map<String, Object> params);
}
